<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>密保修改</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="__PUBLIC__/Theme1/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/style.min.css?v=4.1.0" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/static/plupload/upfiless.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/Theme1/lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/Theme1/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css"
          rel="stylesheet">
    <style>
        .button, .button:visited {
            background: #222 url(overlay.png) repeat-x;
            display: inline-block;
            padding: 5px 10px 6px;
            color: #fff;
            text-decoration: none;
            -moz-border-radius: 6px;
            -webkit-border-radius: 6px;
            -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
            -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
            text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.25);
            border-bottom: 1px solid rgba(0, 0, 0, 0.25);
            position: relative;
            cursor: pointer
        }
    </style>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5><a href="/User/password_protect_set"><input type="button" value="密保设置"
                                                                    style="background: #1AB394" class="button"/></a>
                    </h5>
                    <h5><a href="/User/password_protect_update"><input type="button" value="修改密保"
                                                                       style="background: #1AB394" class="button"/></a>
                    </h5>
                    <div class="ibox-tools">
                    </div>
                </div>
                <div class="ibox-content">
                    <form method="post" action="" class="form-horizontal" id="form-admin-add"
                          enctype="multipart/form-data">

                        <div class="form-group">
                            <label class="col-sm-1 control-label">会员编号</label>
                            <div class="col-sm-3">
                                <input type="text" value="<{$userarr.loginname}>" name="txt_loginname"
                                       id="txt_loginname" readonly="readonly" class="form-control"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label">密保问题一</label>
                            <div class="col-sm-3">
                                <select name="question1" class="form-control">
                                    <option value="<{$userarr.question1}>"><?php  echo common_password_protect($userarr['question1']) ?></option>
                                </select>
                                <input type="text" name="question1_answer" id="question1_answer"
                                       class="form-control" required="required" placeholder="请输入密保一答案"/>

                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label">密保问题二</label>
                            <div class="col-sm-3">
                                <select name="question2" class="form-control">
                                    <option value="<{$userarr.question2}>"><?php  echo common_password_protect($userarr['question2']) ?></option>
                                </select>
                                <input type="text" name="question2_answer" id="question2_answer"
                                       class="form-control" required="required" placeholder="请输入密保二答案"/>

                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label">密保问题三</label>
                            <div class="col-sm-3">
                                <select name="question3" class="form-control">
                                    <option value="<{$userarr.question3}>"><?php  echo common_password_protect($userarr['question3']) ?></option>
                                </select>
                                <input type="text" name="question3_answer" id="question3_answer"
                                       class="form-control" required="required" placeholder="请输入密保三答案"/>

                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button class="btn btn-primary" type="submit">点击验证密保</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="__PUBLIC__/Theme1/js/jquery.min.js?v=2.1.4"></script>
<script src="__PUBLIC__/Theme1/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__PUBLIC__/Theme1/js/content.min.js?v=1.0.0"></script>
<script src="__PUBLIC__/Theme1/js/plugins/iCheck/icheck.min.js"></script>

<script type="text/javascript" src="__PUBLIC__/Theme1/check/js/jquery.validate.min.js"></script>

<script type="text/javascript" src="__PUBLIC__/Theme1/check/js/messages_zh.min.js"></script>

<script type="text/javascript" src="__PUBLIC__/Theme1/check/js/validate-methods.js"></script>
<script type="text/javascript" src="__PUBLIC__/Theme1/lib/webuploader/0.1.5/webuploader.min.js"></script>

<script>
    $(document).ready(function () {
        $('#pwd1_now').focus();
//        $(".i-checks").iCheck({checkboxClass: "icheckbox_square-green", radioClass: "iradio_square-green",});
    });
    function check_pwd1(pwd1) {
        $.ajax({
            type: "GET",
            url: "__URL__/check_pwd1",
            data: {pwd1: pwd1},
            dataType: 'json',
            success: function (data) {
                if (!data == '1') {
                    $('#pwd1_now').val('').focus().attr('placeholder', '请正确输入原登录密码');
                }
            }
        });


    }
    function checkPasswords() {
        var pass1 = document.getElementById("pwd1");
        var pass2 = document.getElementById("pwd1_confirm");

        if (pass1.value != pass2.value) {
//            $('#pwd1').val('');
//            $('#pwd1_confirm').val('');
            pass1.setCustomValidity("两次输入的密码不匹配");
        } else {
            pass1.setCustomValidity("");
        }


    }
</script>

</body>

</html>
